
<%@ page import="driver.service.PayforServiceImple_u" %>
 <%@ page import="driver.entity.Payfor" %>
 <%@ page import="java.text.SimpleDateFormat" %><%--
  Created by IntelliJ IDEA.
  User: LSK
  Date: 2019/10/17
  Time: 17:00
  To change this template use File | Settings | File Templates.
--%>
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <html>

 <head>
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <title>西安学车管家</title>
     <link rel="shortcut icon" href="img/bitbug_favicon.ico">
     <base target="_blank" />
     <link rel="stylesheet" href="bootstrap/dist/css/bootstrap.min.css">
     <title>用户:查看自己申请赔付详情</title>
 </head>
 <style>
     body {
         margin: 0;
         padding: 0;
         background-color: rgb(241, 241, 241);
     }

     #search {
         background: #ffffff;
         box-shadow: 2px 0px 15px 1px rgb(231, 231, 231);
     }

     #search li {
         border-bottom: 1px solid rgb(255, 255, 255);
     }

     #search li:hover {
         border-bottom: 1px solid #5FB878;
     }

     #search .navbar-brand:hover,
     #search li a:hover {
         color: #5FB878;
     }

     .container {
         background: #fff;
     }

     .check {
         color: red;
     }

     img {
         width: 300px;
         height: 200px;
     }
     table td,
     th,
     tr {
         font-size: 13px;
     }
 </style>

 <body>
     <!--导航条-->
     <nav class="navbar navbar-default " id="search">
         <div class="container">
             <!-- Brand and toggle get grouped for better mobile display -->
             <div class="navbar-header">
                 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                     data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                     <span class="sr-only">Toggle navigation</span>
                     <span class="icon-bar"></span>
                     <span class="icon-bar"></span>
                     <span class="icon-bar"></span>
                 </button>
                 <a target='_blank'  class="navbar-brand" href="index.jsp" data-toggle="tooltip" data-placement="bottom" title="返 回 首 页">
                     <img src="asset/logoBig.png" style="width: 100px;height:38px;margin-top: -7px" alt="">
                 </a>
             </div>

             <!-- Collect the nav links, forms, and other content for toggling -->
             <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                 <ul class="nav navbar-nav">
                     <!--<li><a target='_blank'  href="showusers.jsp?page=0">查看所有学员基本信息 <span class="sr-only"></span></a></li>
                     <li><a target='_blank'  href="adduser.jsp">批量导入学员基本信息</a></li>
                     <li><a target='_blank'  href="payfor.jsp">处理学员理赔信息</a></li>
                     <li><a target='_blank'  href="showschools.jsp?page=0">驾校信息修改(暂未实现)</a></li>-->
                 </ul>
                 <ul class="nav navbar-nav navbar-right">
                   <!--  <li><a target='_blank'  href="#">当前登录用户:管理员</a></li>
                     <li class="dropdown">
                         <a target='_blank'  href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                             aria-expanded="false">用户操作 <span class="caret"></span></a>
                         <ul class="dropdown-menu">
                             <li><a target='_blank'  href="#">退出登录</a></li>
                             <li><a target='_blank'  href="#">退出登录</a></li>
                             <li><a target='_blank'  href="#">退出登录</a></li>
                         </ul>
                     </li>-->
                 </ul>
             </div><!-- /.navbar-collapse -->
         </div><!-- /.container-fluid -->
     </nav>
     <!-- 内容主体 -->
     <div class="container">
         <h2 class="h2">处理详情</h2>
         <table class=" table table-bordered table-striped">
             <!-- <tr>
            <td>编号:123</td>
            <td>姓名:张三丰</td>
            <td>申请时间:2019年10月14日</td>
        </tr>
        <tr>
            <td>手机号码:19920987854</td>
            <td colspan="2">身份证号码:61032118881245</td>
        </tr>
        <tr>
            <td colspan="3">申请理赔信息:科二没有通过，科二真的没有通过，二没有通过，科二真的没有通过，二没有通过，科二真的没有通过，二没有通过，科二真的没有通过，</td>
        </tr>
        <tr><td><img src="../img/sfz.jpg"></td>
            <td><img src="../img/sfz.jpg"><</td>
            <td><img src="../img/sfz.jpg"></td></tr>
            -->
             <%
            //String id = (String)session.getAttribute("id");
            //String id = String.valueOf(session.getAttribute("id"));
            //System.out.println(request.getParameter("id"));
            String payfor_id=request.getParameter("id");
            /*if(id.equals("null"))
            {
                payfor_id=request.getParameter("id");
            }
            else
            {
                payfor_id=id;
            }*/
            //System.out.println(payfor_id);
            PayforServiceImple_u service=new PayforServiceImple_u();
            //String payfor_id="5";//这个数字应该从页面传参
            

            Payfor payfor = service.show_detail(payfor_id);
            //System.out.println(payfor.toString());
            pageContext.setAttribute("payfor",payfor);
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
            %>
             <%/*out.print(" <tr>\n" +
                    "                <td>编号:"+payfor.getId()+"</td>\n" +
                    "                <td>姓名:"+payfor.getName()+"</td>\n" +
                    "                <td>申请时间:"+payfor.getTime()+"</td>\n" +
                    "            </tr>\n" +
                    "            <tr>\n" +
                    "                <td>手机号码:"+payfor.getPhonenum()+"</td>\n" +
                    "                <td colspan=\"2\">审核状态:审核中(待完善)</td>\n" +
                    "            </tr>\n" +
                    "            <tr>\n" +
                    "                <td colspan=\"3\">审核意见:"+payfor.getValue()+"</td>\n" +
                    "            </tr>\n" +
                    "            <tr><td><img src=\""+payfor.getIdcard1_src()+"\"></td>\n" +
                    "                <td><img src=\""+payfor.getIdcard2_src()+"\"><</td>\n" +
                    "                <td><img src=\""+payfor.getUnpass_src()+"\"></td></tr>");*/
        %>
             <tr>
                 <td>编号:${payfor.id}</td>
                 <td>姓名:${payfor.name}</td>
                 <td>申请时间:<%out.print(sdf.format(payfor.getTime()));%></td>
             </tr>
             <tr>
                 <td>手机号码:${payfor.phonenum}</td>
                 <td>考试时间:${payfor.examtime}</td>
                 <td>考试地点:${payfor.examadd}</td>
             </tr>
             <tr>
                 <td>122密码:${payfor.pass122}</td>
                 <td colspan="2">理赔项目:${payfor.payitem}</td>
             </tr>
             <tr>
                 <td>身份证正面照片:<br>
                     <img src="${payfor.idcard1_src}" alt="身份证正面照片"></td>
                 <td>身份证反面照片:<br>
                     <img src="${payfor.idcard2_src}" alt="身份证反面照片">
                 </td>
                 <td colspan="1">考试未通过照片:<br>
                     <img style="width: 250px;height: 330px" src="${payfor.unpass_src}" alt="考试未通过照片">
                 </td>
             </tr>
             <%
                 //照片命名规则；
                 //前缀
                 String head=payfor.getName()+"_"+payfor.getPhonenum()+"_"+payfor.getExamtime()+"_"+payfor.getExamadd()+"_";
                 pageContext.setAttribute("head",head);

             %>
             <tr>
                 <td colspan="1"><a target='_blank'  href="${payfor.idcard1_src}" download="${head}身份证正面.jpg">下载身份证正面照片</a></td>
                 <td colspan="1"><a target='_blank'  href="${payfor.idcard2_src}" download="${head}身份证反面.jpg">下载身份证反面照片</a></td>
                 <td colspan="1"><a target='_blank'  href="${payfor.unpass_src}" download="${head}考试未通过.jpg">下载考试未通过照片</a></td>
             </tr>
             <!-- <tr>

        </tr>-->
             <tr>

             </tr>
             <tr>
                 <!--审核状态
            0审核中
            1审核通过
            2审核不通过-->
                 <td class="check">审核状态:<%
                switch (payfor.getFlag())
                {
                    case 0:
                        out.print("审核过程中");
                        break;
                    case 1:
                        out.print("审核通过");
                        break;
                    case 2:
                        out.print("审核不通过");
                        break;
                    default:
                         out.print("参数异常，请联系管理员");
                         break;
                }
            %></td>
                 <td colspan="2" class="check">审核意见:${payfor.value}</td>
             </tr>
         </table>

         <!--添加审核意见这一模块块学员不可见！-->
         <!--
</div>
<h3 class="h3">审核意见</h3>
<div class="checkbox">
    <label><input type="checkbox" value="">通过</label>
</div>
<div class="checkbox">
    <label><input type="checkbox" value="">不通过</label>
</div>
<form role="form">
    <div class="form-group">
        <textarea class="form-control" rows="3"></textarea>
    </div>
</form>
<button id="btn1" class="btn-lg">
    提交
</button>
-->



     </div>
     <script src="bootstrap/dist/js/jquery-3.4.1.min.js"></script>
     <script src="bootstrap/dist/js/bootstrap.min.js"></script>
     <script src="bootstrap/dist/js/layui/layui.all.js"></script>
     <script>
         /* 鼠标特效 */
         var a_idx = 0;
         jQuery(document).ready(function ($) {
             $("body").click(function (e) {
                 var a = ["富强", "民主", "文明", "和谐", "自由", "平等", "公正", "法治", "爱国", "敬业", "诚信", "友善"];
                 var $i = $("<span/>").text(a[a_idx]);
                 a_idx = (a_idx + 1) % a.length;
                 var x = e.pageX,
                     y = e.pageY;
                 $i.css({
                     "z-index": 9999999999999999999999999999999999999999,
                     "top": y - 20,
                     "left": x,
                     "position": "absolute",
                     "font-weight": "bold",
                     "color": "#ff6651"
                 });
                 $("body").append($i);
                 $i.animate({
                         "top": y - 180,
                         "opacity": 0
                     },
                     1500,
                     function () {
                         $i.remove();
                     });
             });
         });
         //alert("用户名不存在，请联系管理员");
     </script>
     <script>
         $(function () {
             $('[data-toggle="tooltip"]').tooltip()
         })
     </script>
 </body>

 </html>